/*
                  Camera Class Implementation
*/

#ifndef CAMERA_H
#define CAMERA_H

#include "SDL/SDL.h"
#include <iostream>

#include "NetworkDefinitions.h"
#include "Point.h"

using namespace std;

class Camera
{
    public:

        // Parametered constructor
        static int Init(Point View, bool iBounded, SDL_Rect Map, const int& iSpeed);

        // Update the view's position, according to the position of the
        // Character
        static SDL_Rect     Update(const SDL_Rect& Character);

        static SDL_Rect     UpdateChase(const SDL_Rect& Character, const int& iDirection, const int& iFrameTime);

        // Returns the current set map and allows to change it.
        static SDL_Rect&    GetMap();

        // Returns the current view and allows to change it.
        static SDL_Rect&    GetView();

        // Returns weither the camera is bounded or not.
        static bool         IsBounded();

        // Set the state of the boundary.
        static void         SetBound(bool iBounded);

        static void         MoveRelative(int iXREL, int iYREL);

        static Point        GetFocus();

    private:
        Camera();

        // Rectangle defining the properties of the current room
        static SDL_Rect map;

        // Rectangle defining the properties of the current view. Is only
        static SDL_Rect view;

        // Define the kind of camera (bounded to the room or not)
        static bool Bounded;

        static int iXPixelsPerSecond;
        static int iYPixelsPerSecond;

        static int iXMaxDistance;
        static int iYMaxDistance;

        static int iSnakeSpeed;

        static Point Position;
};

#endif
